package leetcode_1100;

import java.util.Arrays;

public class MovingStonesUntilConsecutive_1033 {
	public int[] numMovesStones(int a, int b, int c) {
        int[] arr = new int[] {a,b,c};
        Arrays.sort(arr);
        if(arr[0]+1 == arr[1] && arr[1]+1 == arr[2]) return new int[] {0,arr[2]-arr[0]-2};
        if(arr[1]-arr[0] <= 2 || arr[2]-arr[1] <= 2) return new int[] {1,arr[2]-arr[0]-2};
        return new int[] {2,arr[2]-arr[0]-2};
    }
}
